package dbsql;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * Created by jason on 15/12/8.
 */
public class GetResult {
    private ResultSet rs;

    public ResultSet GetData(String sql) throws SQLException {
        Connection conn = ConnSQL.getConn();
        try {

            PreparedStatement ps = conn.prepareStatement(sql);
            rs = ps.executeQuery();
        } catch (SQLException e) {
            e.printStackTrace();
        }

        return rs;
    }
}
